import properties
import os
import getpass
import subprocess

p = properties.Properties(
    os.path.join(os.path.expanduser("~"), "zxh/jar/crawler.properties").__str__(),
    "utf-8",
)
p.set("browser.chrome", "/opt/soft/selenium/chromedriver_linux64/chromedriver")
p.set("browser.binary", subprocess.getoutput("which google-chrome"))
p.set("browser.force.show", "false")
p.set("browser.window.img", os.path.join(os.path.expanduser("~"), "zxh/chrome/img"))
p.set("cookie", os.path.join(os.path.expanduser("~"), "zxh/chrome/test"))
p.set("study.cookie", os.path.join(os.path.expanduser("~"), "zxh/chrome/study"))
p.set("study.url", "https://juejin.cn/post/7126726691656826917")
p.set("study.fast", "false")
p.set("study.fastIndex", "1")
p.set("sleep.radio", "1")
p.set(
    "user-data-dir",
    os.path.join(
        os.path.expanduser("~"), ".config/" + getpass.getuser() + "/google-chrome/"
    ),
)
p.set(
    "back_path",
    os.path.join(os.path.expanduser("~"), "zxh/project/note/blog/source/_posts/args"),
)
p.set("black_path", os.path.join(os.path.expanduser("~"), "zxh/chrome/black.txt"))
p.set("blacklog_path", os.path.join(os.path.expanduser("~"), "zxh/chrome/blacklog.txt"))
